package cn.yangliu.nacos.comm.model;

import javax.validation.constraints.NotBlank;

import cn.yangliu.nacos.comm.constant.GlobalValidateConstants;
import lombok.Data;

/**
 * The type of nacos.
 *
 * @author 问道于盲
 * @date 2019 -12-31
 */
@Data
public class Oauth2UpdatePasswordModel {

    /**
     * current class instance's member.
     * The Password.
     */
    @NotBlank(message = GlobalValidateConstants.PASSWORD_MISS)
    private String password;


    /**
     * Build oauth 2 update password model.
     *
     * @param password the password
     * @return the oauth 2 update password model
     */
    public static Oauth2UpdatePasswordModel build(String password) {
        Oauth2UpdatePasswordModel model = new Oauth2UpdatePasswordModel();
        model.setPassword(password);
        return model;
    }
}
